<?php
class controller{
    public $smarty;
    
    public function header(){
        header("Content-type: text/html; charset=utf-8");
    }
    public function smartyAction($filename="Index"){
         include DOCMENT_ROOT."/Framework/smarty/Smarty.class.php";   //引入smarty
         $this->smarty=new Smarty();  //实例化smarty
         $this->smarty->template_dir=DOCMENT_ROOT."/Application/{$filename}/view";  //定义模板文件
         $this->smarty->compile_dir=DOCMENT_ROOT."/Application/{$filename}/view_c";   //定义合成文件
    }
}

